<template>
  <el-dialog :title="title" :visible.sync="dialogVisible" :close-on-click-modal="false" width="960px" append-to-body>
    <div class="">
      <div class="table_box" v-loading="loading">
        <el-table border :data="tableData.records" style="width: 100%" stripe>
          <el-table-column prop="tel" label="手机号"></el-table-column>
          <el-table-column prop="accountNumber" label="核对状态">
            <template slot-scope="scope">
              <span>
                <el-tag :type="commonMaps.kaweiHeduiTypeMap[scope.row.heduiState||0].type">{{ commonMaps.kaweiHeduiTypeMap[scope.row.heduiState||0].label }}</el-tag>
              </span>
            </template>
          </el-table-column>
          <el-table-column prop="createName" label="操作人"></el-table-column>
          <el-table-column prop="createTime" label="操作时间"></el-table-column>
          <el-table-column prop="heduiImg" label="图片">
            <template slot-scope="scope">
              <img-box :img="scope.row.heduiImg" width="100px" height="50"></img-box>
            </template>
          </el-table-column>
        </el-table>
        <pagination v-show="tableData.total > 0" :total="tableData.total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />

      </div>
    </div>
  </el-dialog>
</template>

<script>
import phoneApi from "@/api/phoneManage";
export default {
  name: "",
  data() {
    return {
      dialogVisible: false,
      loading: false,
      title: "核对记录",
      tableData: {
        records: [],
        total: 0,
      },
      queryParams: {
        pageNum: 1,
        pageSize: 10,
      },
    };
  },
  created() {},
  computed: {
    // carrierTypes() {
    //   return this.$store.getters.gameYunyingshangList;
    // },
  },
  methods: {
    // 打开弹窗
    open(id) {
      this.queryParams.telManageId = id;
      this.dialogVisible = true;
      this.getList();
    },
    // 重置
    resetQuery() {
      this.queryParams = {
        pageNum: 1,
        pageSize: 10,
        telManageId: this.queryParams.telManageId,
      };
      this.timer = [];
      this.getList();
    },
    getList() {
      this.loading = true;
      phoneApi.getHeDuijilu(this.queryParams).then((res) => {
        this.loading = false;
        this.tableData.records = res.rows;
        this.tableData.total = res.total;
      });
    },
    search() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    close() {
      this.reset();
      this.dialogVisible = false;
    },
  },
};
</script>
<style scoped lang="css">
</style>
